﻿#region 命名空间

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.PolicyInjection;
using Microsoft.Practices.EnterpriseLibrary.PolicyInjection.Configuration;
using WinnerCMS.Common;
using WinnerCMS.Common.Security;
using WinnerCMS.Model;
using WinnerCMS.BLL;
using WinnerCMS.BLL.PageFactory.TagModule;

#endregion

namespace WinnerCMS.WebUI
{
    public partial class Test : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //List<int> list = new List<int>() { 3, 5, 12, 1, 14, 20, 7, 1, 11, 8, 2, 13, 15 };
            //Dictionary<int, int> dic = new Dictionary<int, int>();
            //for (var i = 0; i < list.Count; i++)
            //{
            //    dic.Add(i, list[i]);
            //}

            //Dictionary<int, int> Newdic = (from x in dic where IsOdd(x.Value) select x).ToDictionary(x => x.Key, x => x.Value);

            var v = new {Title = "wwwww", ID = 0};

            LogHelper.Error(v.ToJson());
        }

        /// <summary>
        ///     是否为奇数
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public static bool IsOdd(int n)
        {
            return Convert.ToBoolean(n & 1);
        }
    }
}